package seven.three;

import org.apache.hadoop.io.WritableComparable;
import org.apache.hadoop.io.WritableComparator;

import seven.entity.OrderBean;

public class MyGroupingComparator extends WritableComparator{

	public MyGroupingComparator(){
		super(OrderBean.class,true);
	}

	@Override
	public int compare(WritableComparable a, WritableComparable b) {
		OrderBean a1 = (OrderBean)a;
		OrderBean b1 = (OrderBean)b;
		return a1.getItemId().compareTo(b1.getItemId());
	} 
	
}
